﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CapaPresentacion.Commands;
using CapaPresentacion.Vistas;
using Entidades;
using CapaLogica;
using System.Windows.Input;
using System.Windows;
using System.Windows.Data;
using System.Transactions;

namespace CapaPresentacion.Vistas
{
    class VentanaTipoEvaluacionViewModel
    {
        public event EvaluacionElegida EvaluacionElegida;

        private RelayCommand eva1AñoCommand;
        private RelayCommand eva3AñosCommand;
       
        private VentanaTipoEvaluacion view;




        public ICommand Eva1AñoCommand
        {
            get
            {
                return eva1AñoCommand;
            }
        }

        public ICommand Eva3AñosCommand
        {
            get
            {
                return eva3AñosCommand;
            }
        }


        public VentanaTipoEvaluacionViewModel() {}

        public VentanaTipoEvaluacionViewModel(VentanaTipoEvaluacion vista)
        {
            
                this.view = vista;
                this.eva1AñoCommand = new RelayCommand(Eva1Año);
                this.eva3AñosCommand = new RelayCommand(Eva3Años);
           
        }


        private void Eva1Año(Object parameter)
        {
            this.EvaluacionElegida(null, TipoEvaluacion.UnoDosAños);
            this.view.Close();
        }

        private void Eva3Años(Object parameter)
        {
            this.EvaluacionElegida(null, TipoEvaluacion.TresCuatroCincoAños);
            this.view.Close();
        }







    }
}
